package com.yungee.lock.annotation;
import com.yungee.lock.LockType;
import com.yungee.lock.RejectedPolicy;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
@Inherited
public @interface Lock {
    String value() default "";

    RejectedPolicy reject() default RejectedPolicy.ABORT;

    LockType type() default LockType.AUTO;

    int errorno() default 1;

    String msg() default "";

    long expire() default 10L;
}